<?php

App::uses('AppController', 'Controller');

/**
 * WebSettings Controller
 *
 */
class WebSettingsController extends AppController {

    /**
     * Scaffold
     *
     * @var mixed
     */
    public $scaffold;
    public $uses = array('WebSetting');

    public function edit() {
        if ($this->request->is('put')) {
            //debug($this->request->data);
            if ($this->WebSetting->save($this->request->data)) {
                $this->Session->setFlash('Saved.');
            }
            //debug($this->WebSetting->validationErrors);
        } else {
            $this->WebSetting->id = 1;
            $this->data = $this->WebSetting->read();
        }
    }

}
